home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shs_powernosee.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  77 lines

  1. # Jones 3D Cog Script
  2. #
  3. # SHS_Power_NoSee.cog   Isolates Power Room sectors for framerate.
  4. #
  5. # [JWC]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8.  
  9. symbols
  10.     
  11.     message    startup
  12.     message crossed
  13.     
  14.        surface PowerSecOn         linkid=1         
  15.     surface PowerSecOff        linkid=2
  16.     surface PowerSecOn1        linkid=1
  17.     surface PowerSecOff1    linkid=2
  18.     
  19.     surface ClocktowerSecOff 
  20.     surface ClocktowerSecOn    
  21.     
  22.     sector  PowerSec
  23.     sector    ClocktowerSec
  24.  
  25.     int     player        local
  26.  
  27.    
  28.     
  29. end
  30.  
  31. code
  32.  
  33. startup:
  34.     
  35.     player=GetLocalPlayerThing();
  36.     SetSectorAdjoins(PowerSec, 0);
  37.     return;
  38.  
  39. crossed:
  40.     
  41.  
  42.     # make sure Indy player is sending message
  43.     If (GetSourceRef() != player) return;
  44.  
  45.     # draw sector
  46.     If (GetSenderId() == 1)
  47.     {
  48.         
  49.         SetSectorAdjoins(PowerSec, 1);
  50.     }    
  51.     
  52.     If (GetSenderRef() == ClockTowerSecOn) 
  53.     {
  54.         SetSectorAdjoins(ClockTowerSec, 1);
  55.     }
  56.     
  57.     # don't draw sector 
  58.     
  59.     If ((GetSenderId() == 2))
  60.     {
  61.         SetSectorAdjoins(PowerSec, 0);
  62.     }
  63.     
  64.     If (GetSenderRef() == ClockTowerSecOff) 
  65.     {
  66.         SetSectorAdjoins(ClockTowerSec, 0);
  67.     }
  68.      
  69.     return;
  70.     
  71.  
  72.  
  73. end
  74.  
  75.     
  76.